package com.jiangjiang.eshop.commodity.operation;

import lombok.Data;

/**
 * @ClassName Category
 * @Description TODO
 * @Author jhw
 * @Date 2021/7/9 14:33
 * @Version 1.0
 **/
@Data
public class Category {

    /**
     * 类目id
     */
    private Long categoryId;

    public Category(Long categoryId) {
        this.categoryId = categoryId;
    }

    public <T> T execute(CategoryOperation<T> operation) throws Exception {
       return operation.doExecute(this);
    }
}
